home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / db / esm-3.1 / esm-3 / usr / local / sm / src / client / include / sequentialfile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-05  |  3.0 KB  |  141 lines

  1. #ifndef _SEQUENTIALFILE_H_
  2. #define _SEQUENTIALFILE_H_
  3. /*
  4.  *   $RCSfile: sequentialfile.h,v $  
  5.  *   $Revision: 1.1.1.1 $  
  6.  *   $Date: 1996/05/04 21:55:20 $      
  7.  */ 
  8. /**********************************************************************
  9. * EXODUS Database Toolkit Software
  10. * Copyright (c) 1991 Computer Sciences Department, University of
  11. *                    Wisconsin -- Madison
  12. * All Rights Reserved.
  13. *
  14. * Permission to use, copy, modify and distribute this software and its
  15. * documentation is hereby granted, provided that both the copyright
  16. * notice and this permission notice appear in all copies of the
  17. * software, derivative works or modified versions, and any portions
  18. * thereof, and that both notices appear in supporting documentation.
  19. *
  20. * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
  21. * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.  
  22. * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
  23. * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  24. *
  25. * The EXODUS Project Group requests users of this software to return 
  26. * any improvements or extensions that they make to:
  27. *
  28. *   EXODUS Project Group 
  29. *     c/o David J. DeWitt and Michael J. Carey
  30. *   Computer Sciences Department
  31. *   University of Wisconsin -- Madison
  32. *   Madison, WI 53706
  33. *
  34. *     or exodus@cs.wisc.edu
  35. *
  36. * In addition, the EXODUS Project Group requests that users grant the 
  37. * Computer Sciences Department rights to redistribute these changes.
  38. **********************************************************************/
  39.  
  40. /*
  41.  *    define the sequential load descriptor
  42.  */
  43. typedef struct    {
  44.  
  45.     RESOURCEID        id;
  46.     UNIQUE            unique;
  47.     LIST            list;
  48.     FLAGS            flags;
  49.     int                index;
  50.  
  51. #if MAGIC_CHECKING IS_ENABLED
  52.  
  53.     MAGIC            magic;
  54.  
  55. #endif
  56.  
  57. } SEQLOADDESC;
  58.  
  59.  
  60. #define SEQLOADDESC_MAGIC        0xf2d1557a
  61.  
  62.  
  63. /*
  64.  *    define the states of the load descriptors
  65.  */
  66. #define SEQLOAD_FREE    0x0
  67. #define SEQLOAD_ACTIVE    0x1
  68.  
  69.  
  70. /*
  71.  *    define the sequential load descriptor
  72.  */
  73. typedef struct    {
  74.  
  75.     RESOURCEID        id;
  76.     UNIQUE            unique;
  77.     LIST            list;
  78.     FLAGS            flags;
  79.     int                index;
  80.  
  81. #if MAGIC_CHECKING IS_ENABLED
  82.  
  83.     MAGIC            magic;
  84.  
  85. #endif
  86.  
  87. } SEQSCANDESC;
  88.  
  89.  
  90. #define SEQSCANDESC_MAGIC        0x8493273e
  91.  
  92.  
  93. /*
  94.  *    define the states of the load descriptors
  95.  */
  96. #define SEQSCAN_FREE    0x0
  97. #define SEQSCAN_ACTIVE    0x1
  98.  
  99.  
  100. /*
  101.  *    define the magic macros for the sequential structures
  102.  */
  103. #if MAGIC_CHECKING IS_ENABLED
  104.  
  105.  
  106. #define INIT_SEQSCANDESC_MAGIC(_scanDesc)                \
  107.     (_scanDesc)->magic = SEQSCANDESC_MAGIC;
  108.  
  109. #define INIT_SEQLOADDESC_MAGIC(_loadDesc)                \
  110.     (_loadDesc)->magic = SEQLOADDESC_MAGIC;
  111.  
  112. #define CHECK_SEQSCANDESC_MAGIC(_scanDesc)                \
  113.                                                         \
  114.     if ((_scanDesc)->magic != SEQSCANDESC_MAGIC)    {    \
  115.         SM_ERROR(TYPE_FATAL, esmINTERNAL);                \
  116.     }
  117.  
  118. #define CHECK_SEQLOADDESC_MAGIC(_loadDesc)                \
  119.                                                         \
  120.     if ((_loadDesc)->magic != SEQLOADDESC_MAGIC)    {    \
  121.         SM_ERROR(TYPE_FATAL, esmINTERNAL);                \
  122.     }
  123.  
  124.  
  125. #else
  126.  
  127.  
  128. #define INIT_SEQSCANDESC_MAGIC(_scanDesc)
  129.  
  130. #define INIT_SEQLOADDESC_MAGIC(_loadDesc)
  131.  
  132. #define CHECK_SEQSCANDESC_MAGIC(_scanDesc)
  133.  
  134. #define CHECK_SEQLOADDESC_MAGIC(_loadDesc)
  135.  
  136.  
  137. #endif
  138.  
  139.  
  140. #endif /* _SEQUENTIALFILE_H_ */
  141.